package com.travel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.travel.entity.po.TravelPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:Jasenon_ce
 * @Date: 2025/03/16/下午4:54
 */
@Mapper
public interface TravelPlanMapper extends BaseMapper<TravelPlan> {
    
    /**
     * 查询用户所有旅行计划（不包含计划详情）
     * @param username 用户名
     * @return 旅行计划列表
     */
    @Select("SELECT id, username, title, create_time, start_time, end_time FROM travel_plan WHERE username = #{username}")
    List<TravelPlan> selectByUsername(@Param("username") String username);
}
